<template>
	<view>
		<view class="flex-n"><text>名称：</text><text>{{form.name}}</text></view>
		<view class="flex-n"><text>型号：</text><text>{{form.model}}</text></view>
		<view class="flex-n"><text>数量：</text><text>{{form.count}}</text></view>
		<view class="flex-n"><text>单位：</text><text>{{unitList[form.unit]}}</text></view>
		<view class="flex-n"><text>仓库：</text><text>{{form.storage}}</text></view>
		<view class="flex-n"><text>分类：</text><text>{{form.goodsType}}</text></view>
		<view class="edit-btn">
			<button type="warn" size="mini" style="margin-right: 20rpx;">出库</button>
			<button type="primary" size="mini">入库</button>
		</view>
	</view>
</template>

<script>
	export default {
		name:"goodsdetail",
		data() {
			return {
				unitList:['卷','个','包','PCS','套','盒','米','箱','根','片','台','瓶'],
				form:{}
			}
		},
		onLoad(option) { //option为object类型，会序列化上个页面传递的参数
			console.log(option.item); //打印出上个页面传递的参数。
			this.form=JSON.parse(option.item)
			// this.slectTab(0)
		},
		methods: {
			
		}
	}
</script>

<style lang="less" scoped>
.flex-n{
	padding: 5rpx 20rpx;
	:nth-child(1){
		font-weight: 900;
		width: 140rpx;
	}
}
.edit-btn{
	margin: 20rpx;
}
</style>
